writefile=list.js
path=./photos
find $path -name *.jpg | tr "\n" ";" > $writefile
sed -i 's/^/images=\"&/g' $writefile
sed -i 's/$/\"&/g' $writefile